'''
需求：
Given an array, find the int that appears an odd number of times.
There will always be only one integer that appears an odd number of times.
测试：
test.assert_equals(find_it([20,1,-1,2,-2,3,3,5,5,1,2,4,20,4,-1,-2,5]), 5)
'''
# 方式一：
# def find_it(seq):
#     num_dict = {}
#     for num in seq :
#         if not num in num_dict.keys() :
#             num_dict[num] = 1
#         else :
#             num_dict[num] += 1
    
#     for k,v in num_dict.items() :
#         if v % 2 != 0 :
#             return k

# 方式二：

def find_it(seq):
    for i in seq:
        if seq.count(i) % 2 != 0:
            return i
    